/*
 * Group 3, User Interface Programming II (vt11)
 * Pooya | Flora | Monica | Can
 */
package vical.action;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.KeyStroke;
import vical.model.Internationalization;
import vical.view.tutorial.GlassTutorial;
import vical.view.tutorial.TutorialContainer;
import vical.view.tutorial.TutorialGuide;

/**
 * Displays the "How to Use" dialog.
 *
 * @author WoKe
 */
public class HowToUseAction extends AbstractAction {

    private TutorialContainer tutorialContainer;

    public HowToUseAction(TutorialContainer container) {
        super(Internationalization.getString("howTo"));
        putValue(Action.ACCELERATOR_KEY,
                KeyStroke.getKeyStroke("F1"));

        this.tutorialContainer = container;
    }

    public void actionPerformed(ActionEvent e) {
        GlassTutorial glassTutorial = new TutorialGuide(tutorialContainer);
        tutorialContainer.setGlassTutorial(glassTutorial);
        tutorialContainer.showTutorial(true);
    }
}
